using System;
using uTILLIty.Rave.Contract.StorageAdapter;

namespace uTILLIty.Rave.Core.StorageAdapter
{
	/// <summary>
	/// Extensions for the <see cref="NtfsStorageAdapter"/> to the <see cref="StorageMember"/> class
	/// </summary>
  public static class StorageMemberExtensions
  {
		/// <summary>
		/// Returns the <see cref="ActiveDirectoryMemberInformation"/> of the supplied <see cref="StorageMember"/>
		/// </summary>
    public static ActiveDirectoryMemberInformation LdapInfo(this StorageMember storageMember)
    {
      if (storageMember == null)
        throw new ArgumentNullException();

      return (ActiveDirectoryMemberInformation) storageMember.TargetMember;
    }
  }
}